From: Jun Sun Date: Mon, 10 Oct 2016 19:27:56 +0000 (-0700) Subject: Don't clear HCR_VM bit when updating VTTBR. X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~3270 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c655b112fb5fd677e0943dafaa1071501f8fc190;p=xen.git Don't clear HCR_VM bit when updating VTTBR. Currently function p2m_restore_state() would clear HCR_VM bit, i.e., disabling stage2 translation, before updating VTTBR register. After some research and talking to ARM support, I got confirmed that this is not necessary. We are currently working on a new platform that would need this to be removed. The patch is tested on FVP foundation model. Signed-off-by: Jun Sun Acked-by: Steve Capper Acked-by: Stefano Stabellini --- diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index cc5634bd17..e4991df42f 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -140,8 +140,6 @@ void p2m_restore_state(struct vcpu *n) return; hcr = READ_SYSREG(HCR_EL2); - WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2); - isb(); WRITE_SYSREG64(p2m->vttbr, VTTBR_EL2); isb();